package com.rainman.noswagger.util;

import java.io.File;
import java.util.List;

public class FileUtils {
    public static void scannerJavaFiles(File file, List<File> javaFileList
                                        //,List<File> javaFileList
    ){

        if(file==null){
            return;
        }

        File[] files = file.listFiles();

        if(files==null){
            return;
        }

        for(File file1:files){

            if(file1.isDirectory()){
                scannerJavaFiles(file1,javaFileList);
            }else {
                if(file1.getName().endsWith("java")){
                    javaFileList.add(file1);
                }
            }
        }
    }
}
